import requestUtil from "./../request/requestUtil.js"
import constants from "./../common/constants.js"

const httpConfig = constants.HTTP_CONFIG

const userApi = {
	// 登陆
	accountLogin:(param)=>{
		return requestUtil('user/accountLogin',httpConfig.method.post,param)
	},
	// 注册
	register:(param)=>{
		return requestUtil('user/register',httpConfig.method.post,param)
	},
	// 获取用户信息
	getUserInfo:(param)=>{
		return requestUtil('user/getUserInfo',httpConfig.method.post,param)
	},
	// 完善用户信息
	finishUserInfo:(param)=>{
		return requestUtil('user/finishUserInfo',httpConfig.method.post,param)
	},
	// 手机验证登录
	phoneNumLogin:(param)=>{
		return requestUtil('user/phoneNumLogin',httpConfig.method.post,param)
	},
	// 获取验证码
	getMsgCode:(param)=>{
		return requestUtil('user/getMsgCode',httpConfig.method.get,param)
	},
	// 验证token是否有效
	validateToken:(param)=>{
		return requestUtil('user/validateToken',httpConfig.method.post,param)
	},
	// 上传tupian
	upload:(param)=>{
		return requestUtil('file/upload',httpConfig.method.post,param)
	},
}

export default userApi